﻿/*
Digraph (library for building, traversal, comparison and saving of directed
graph).

Copyright (C) 2014 Dmitry Merzagitovich Arslanov

This library is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free
Software Foundation; either version 2.1 of the License, or (at your option) any
later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*/

namespace Digraph
{
    /// <summary>
    /// User supplied callback function to select vertex for next step of
    /// digraph traverse.
    /// </summary>
    /// <param name="preferredVertex">
    /// Prefer vertex which is null at first step.
    /// </param>
    /// <param name="currentVertex">Current vertex for select.</param>
    /// <returns>
    /// One of the prefer vertex, current vertex and null to stop traverse.
    /// </returns>
    public delegate Vertex<TVertex, TArc> VertexSelector<TVertex, TArc>(
        Vertex<TVertex, TArc> preferredVertex,
        Vertex<TVertex, TArc> currentVertex);
}
